package a.f.l.a;

import a.d.t;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class i
{
  private final boolean a;
  private final ArrayList b = new ArrayList();
  private final HashMap c = new HashMap();
  private eb d;
  private eb e;
  private List f;
  public static boolean g;
  
  public i(f paramf)
  {
    this.a = paramf.g();
    a(paramf);
    this.f = new ArrayList();
  }
  
  public void a(f paramf)
  {
    boolean bool = sb.e;
    if (!bool) {
      if (paramf.g() != this.a) {
        throw new IllegalArgumentException("segment is not " + (this.a ? "vertical!" : "horizontal!"));
      }
    }
    this.b.add(paramf);
    if (!bool) {
      if (this.d != null)
      {
        this.d = eb.b(this.d, paramf.c());
        this.e = eb.b(this.e, paramf.b());
        if (!bool) {
          if (sb.d == 0) {
            return;
          }
        }
      }
      else
      {
        this.d = paramf.c();
      }
    }
    this.e = paramf.b();
  }
  
  public eb a()
  {
    return this.d;
  }
  
  public eb b()
  {
    return this.e;
  }
  
  public int c()
  {
    return this.b.size();
  }
  
  public boolean d()
  {
    return this.a;
  }
  
  List e()
  {
    return this.b;
  }
  
  public f a(int paramInt)
  {
    return (f)this.b.get(paramInt);
  }
  
  public int f()
  {
    return this.f.size();
  }
  
  public void a(pc parampc)
  {
    this.f.add(parampc);
  }
  
  public pc b(int paramInt)
  {
    return (pc)this.f.get(paramInt);
  }
  
  public double b(f paramf)
  {
    Double localDouble = (Double)this.c.get(paramf);
    if (!sb.e) {}
    return localDouble == null ? (0.0D / 0.0D) : localDouble.doubleValue();
  }
  
  public void a(f paramf, double paramDouble)
  {
    this.c.put(paramf, new Double(paramDouble));
  }
  
  public t g()
  {
    boolean bool = sb.e;
    if (!bool) {}
    if (!bool) {}
    return eb.d(this.a ? this.d : this.e, this.a ? this.e : this.d);
  }
  
  void a(i parami)
  {
    boolean bool = sb.e;
    if (!bool) {
      if (parami == this) {
        return;
      }
    }
    if (!bool) {
      if (this.a != parami.a) {
        throw new IllegalStateException("cannot splice channels!");
      }
    }
    this.b.addAll(parami.b);
    this.d = eb.b(this.d, parami.d);
    this.e = eb.b(this.e, parami.e);
  }
  
  public String toString()
  {
    boolean bool = sb.e;
    int j = sb.d;
    StringBuffer localStringBuffer = new StringBuffer();
    int i = 0;
    if (i < this.b.size()) {}
    while (bool)
    {
      f localf = (f)this.b.get(i);
      localStringBuffer.append('\n');
      localStringBuffer.append('\t');
      if (!bool)
      {
        if (j != 0) {
          break label146;
        }
        localStringBuffer.append(localf);
        i++;
      }
      if (j == 0) {
        break;
      }
    }
    label146:
    return "Channel{isVertical=" + this.a + ", width=" + this.d + ", length=" + this.e + ", segments=" + localStringBuffer.toString() + '}';
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.i

 * JD-Core Version:    0.7.0.1

 */